var CQueue = function () {
  this.inStack = [];
  this.outStack = [];
};

/**
 * @param {number} value
 * @return {void}
 */
CQueue.prototype.appendTail = function (value) {
  if (this.inStack) {
    this.inStack.push(value);
  }
  return null;
};

/**
 * @return {number}
 */
CQueue.prototype.deleteHead = function () {
  if (this.outStack.length === 0) {
    this.outStack = [...this.inStack];
  }
  this.inStack.shift();
  let res = this.outStack.shift();
  return res == undefined ? -1 : res;
};
